import enum


class ResponseStatus(enum.Enum):
    SUCCESS = 200, '操作成功'
    WRONG_PARAM = 400, '参数错误'
    UNAUTHORIZED = 401, '权限错误'
    FORBIDDEN = 403, '没有权限访问此站'
    INTERNAL_SERVER_ERROR = 500, '服务器错误'
    NOT_FOUND = 404, '访问的资源不存在'

    def __init__(self, code, msg):
        self._name_ = code
        self._value_ = msg

    @property
    def code(self):
        return self._name_

    @property
    def msg(self):
        return self._value_
